import request from '@/utils/request'

// 查询企业信息列表
export function listPlatform(query) {
  return request({
    url: '/system/platform/list',
    method: 'get',
    params: query
  })
}

// 查询企业信息详细
export function getPlatform(organizationId) {
  return request({
    url: '/system/platform/' + organizationId,
    method: 'get'
  })
}

// 新增企业信息
export function addPlatform(data) {
  return request({
    url: '/system/platform',
    method: 'post',
    data: data
  })
}

// 修改企业信息
export function updatePlatform(data) {
  return request({
    url: '/system/platform',
    method: 'put',
    data: data
  })
}

// 删除企业信息
export function delPlatform(organizationId) {
  return request({
    url: '/system/platform/' + organizationId,
    method: 'delete'
  })
}

// 删除企业信息
export function getAuthenticationUrl(organizationId) {
  return request({
    url: '/system/platform/getAuthenticationUrl/' + organizationId,
    method: 'get'
  })
}


// 用户密码重置
export function resetUserPwd(organizationId, password) {
  const data = {
    organizationId,
    password
  }
  return request({
    url: '/system/platform/resetPwd',
    method: 'put',
    data: data
  })
}
